<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module StarWar</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>StarWar</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:d%3A%5C1_vs%20code%5Cvscode%5C%E6%98%9F%E9%99%85%E5%A4%A7%E6%88%98%5Cstarwar%5Cstarwar.py">d:\1_vs code\vscode\星际大战\starwar\starwar.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
<a href="pygame.html">pygame</a><br>
</td><td width="25%" valign=top><a href="random.html">random</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="StarWar.html#Bullet">Bullet</a>
</font></dt><dt><font face="helvetica, arial"><a href="StarWar.html#Enemy">Enemy</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Bullet">class <strong>Bullet</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>#&nbsp;子弹类<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Bullet-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize&nbsp;self.&nbsp;&nbsp;See&nbsp;help(type(self))&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

<dl><dt><a name="Bullet-hit"><strong>hit</strong></a>(self)</dt><dd><tt>#&nbsp;击中</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Enemy">class <strong>Enemy</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Enemy-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize&nbsp;self.&nbsp;&nbsp;See&nbsp;help(type(self))&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

<dl><dt><a name="Enemy-reset"><strong>reset</strong></a>(self)</dt><dd><tt>#&nbsp;当被射中时，恢复位置</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-check_is_on"><strong>check_is_on</strong></a>()</dt></dl>
 <dl><dt><a name="-check_is_over"><strong>check_is_over</strong></a>()</dt></dl>
 <dl><dt><a name="-distance"><strong>distance</strong></a>(bx, by, ex, ey)</dt><dd><tt>#&nbsp;两个点之间的距离</tt></dd></dl>
 <dl><dt><a name="-move_player"><strong>move_player</strong></a>()</dt></dl>
 <dl><dt><a name="-show_bullets"><strong>show_bullets</strong></a>()</dt><dd><tt>#&nbsp;显示并移动子弹</tt></dd></dl>
 <dl><dt><a name="-show_enemy"><strong>show_enemy</strong></a>()</dt><dd><tt>#&nbsp;显示敌人，并且实现敌人的移动和下沉</tt></dd></dl>
 <dl><dt><a name="-show_level"><strong>show_level</strong></a>()</dt><dd><tt>#&nbsp;显示难度等级，即速度因子</tt></dd></dl>
 <dl><dt><a name="-show_score"><strong>show_score</strong></a>()</dt><dd><tt>#&nbsp;显示分数</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>KEYDOWN</strong> = 768<br>
<strong>K_ESCAPE</strong> = 27<br>
<strong>K_SPACE</strong> = 32<br>
<strong>K_UP</strong> = 1073741906<br>
<strong>bao_sound</strong> = &lt;Sound object&gt;<br>
<strong>bgImg</strong> = &lt;Surface(800x600x24 SW)&gt;<br>
<strong>bullets</strong> = []<br>
<strong>bullets_number</strong> = 0<br>
<strong>clock</strong> = &lt;Clock(fps=117.65)&gt;<br>
<strong>enemies</strong> = [&lt;StarWar.Enemy object&gt;, &lt;StarWar.Enemy object&gt;, &lt;StarWar.Enemy object&gt;, &lt;StarWar.Enemy object&gt;]<br>
<strong>event</strong> = &lt;Event(256-Quit {})&gt;<br>
<strong>font</strong> = &lt;pygame.font.Font object&gt;<br>
<strong>i</strong> = 3<br>
<strong>icon</strong> = &lt;Surface(108x109x32 SW)&gt;<br>
<strong>is_over</strong> = False<br>
<strong>number_of_enemies</strong> = 4<br>
<strong>on_font</strong> = &lt;pygame.font.Font object&gt;<br>
<strong>over_font</strong> = &lt;pygame.font.Font object&gt;<br>
<strong>play_active</strong> = False<br>
<strong>playerImg</strong> = &lt;Surface(122x120x32 SW)&gt;<br>
<strong>playerStepX</strong> = 0<br>
<strong>playerStepY</strong> = 0<br>
<strong>playerX</strong> = 350<br>
<strong>playerY</strong> = 500<br>
<strong>restart</strong> = False<br>
<strong>running</strong> = False<br>
<strong>score</strong> = 0<br>
<strong>screen</strong> = &lt;Surface(800x600x32 SW)&gt;<br>
<strong>speed_factor</strong> = 1</td></tr></table>
</body></html>